/*
response返回工具类
 */
import 'package:xsdk_flutter/xsdk/utils/json/x_utils_json.dart';

abstract class XResponseUtils {

  static const String SuccessCode='200';
  static const String FailCode='-1';

  //返回response格式
  static String responseBodyJson({
    required String code,
    required String message,
    dynamic data,
  }){

    Map<String,dynamic> res={};
    res['code']=code;
    res['message']=message;
    res['data']=data;

    return XJsonUtils.obj2Json(res);
  }



  static Map<String,Object> responseHeaders(){
    Map<String,Object> headers = {
      'content-type': 'application/json',
    };
    return headers;
  }


}